function mxCylinder(bounds, fill, stroke, strokewidth)
{
	this.bounds = bounds;
	this.fill = fill;
	this.stroke = stroke;
	this.strokewidth = strokewidth || 1;
};
mxCylinder.prototype = new mxShape();
mxCylinder.prototype.constructor = mxCylinder;
mxCylinder.prototype.mixedModeHtml = false;
mxCylinder.prototype.preferModeHtml = false;
mxCylinder.prototype.maxHeight = 40;
mxCylinder.prototype.create = function(container)
{
	if (this.stroke == null)
	{
		this.stroke = this.fill;
	}
	return mxShape.prototype.create.apply(this, arguments);
};
mxCylinder.prototype.createVml = function()
{
	var node = document.createElement('v:group');
	this.background = document.createElement('v:shape');
	this.label = this.background;
	this.configureVmlShape(this.background);
	node.appendChild(this.background);
	this.fill = null;
	this.isShadow = false;
	this.configureVmlShape(node);
	this.foreground = document.createElement('v:shape');
	this.configureVmlShape(this.foreground);
	node.appendChild(this.foreground);
	return node;
};
mxCylinder.prototype.redrawVml = function()
{
	var x = Math.floor(this.bounds.x);
	var y = Math.floor(this.bounds.y);
	var w = Math.floor(this.bounds.width);
	var h = Math.floor(this.bounds.height);
	var s = this.strokewidth * this.scale;
	this.node.setAttribute('coordsize', w + ',' + h);
	this.background.setAttribute('coordsize', w + ',' + h);
	this.foreground.setAttribute('coordsize', w + ',' + h);
	this.updateVmlShape(this.node);
	this.updateVmlShape(this.background);
	this.background.style.top = '0px';
	this.background.style.left = '0px';
	this.background.style.rotation = null;
	this.updateVmlShape(this.foreground);
	this.foreground.style.top = '0px';
	this.foreground.style.left = '0px';
	this.foreground.style.rotation = null;
	this.background.setAttribute('strokeweight', s);
	this.foreground.setAttribute('strokeweight', s);
	var d = this.createPath(false);
	this.background.setAttribute('path', d);
	var d = this.createPath(true);
	this.foreground.setAttribute('path', d);
};
mxCylinder.prototype.createSvg = function()
{
	var g = this.createSvgGroup('path');
	this.foreground = document.createElementNS(mxConstants.NS_SVG, 'path');

	if (this.stroke != null)
	{
		this.foreground.setAttribute('stroke', this.stroke);
	}
	else
	{
		this.foreground.setAttribute('stroke', 'none');
	}
	this.foreground.setAttribute('fill', 'none');
	g.appendChild(this.foreground);
	return g;
};
mxCylinder.prototype.redrawSvg = function()
{
	var strokeWidth = Math.max(1, this.strokewidth * this.scale);
	this.innerNode.setAttribute('stroke-width', strokeWidth);
	var d = this.createPath(false);
	this.innerNode.setAttribute('d', d);
	this.updateSvgTransform(this.innerNode, false);

	if (this.shadowNode != null)
	{
		this.shadowNode.setAttribute('stroke-width', strokeWidth);
		this.shadowNode.setAttribute('d', d);
		this.updateSvgTransform(this.shadowNode, true);
	}
	d = this.createPath(true);
	this.foreground.setAttribute('stroke-width', strokeWidth);
	this.foreground.setAttribute('d', d);
	this.updateSvgTransform(this.foreground, false);
};
mxCylinder.prototype.redrawPath = function(path, x, y, w, h, isForeground)
{
	var dy = Math.min(this.maxHeight, Math.floor(h / 5));

	if (isForeground)
	{
		path.moveTo(0, dy);
		path.curveTo(0, 2 * dy, w, 2 * dy, w, dy);
	}
	else
	{
		path.moveTo(0, dy);
		path.curveTo(0, -dy / 3, w, -dy / 3, w, dy);
		path.lineTo(w, h - dy);
		path.curveTo(w, h + dy / 3, 0, h + dy / 3, 0, (h - dy));
		path.close();
	}
};